import request from "@/utils/request";
// 切换路由页面无法实时切换，导致还是走之前的URL 1.路由守卫刷新  2.直接使用统一baseurl管理
import baseUrl from "@/utils/requestBase";

// 登录
export function login(data) {
  return request({
    url: "/login",
    method: "post",
    baseURL: `${baseUrl.admin}`,
    data,
  });
}

// 获取数据
export function getInfo() {
  return request({
    url: "/info",
    method: "get",
    baseURL: `${baseUrl.admin}`,
  });
}

// 登出W
export function logout() {
  return request({
    url: "/logout",
    method: "post",
    baseURL: `${baseUrl.admin}`,
  });
}
